//
//  RequestManager+GROrderManager.m
//  YC_GRice
//
//  Created by luojinrong11 on 2018/7/21.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import "RequestManager+GROrderManager.h"

@implementation RequestManager (GROrderManager)
+(void)getOderList:(NSDictionary*)dic CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@order/v1/orderList",GRiceAPI];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:dic completionHandler:completeHander];
}
+(void)getOrderDetail:(NSInteger)orderId  CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@order/v1/orderDetails/%ld",GRiceAPI,orderId];
    [self MembershipRequestWithURLString:url Method:GR_GET Paramers:nil completionHandler:completeHander];
}

+(void)cancleOrderWithOrderId:(NSInteger)orderId CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@orderReturn/v1/cancelOrder/%ld",GRiceAPI,orderId];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:nil completionHandler:completeHander];
}
+(void)confirmOrderWithOrderId:(NSInteger)orderId CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@order/v1/confirmOrder/%ld",GRiceAPI,orderId];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:nil completionHandler:completeHander];
}
+(void)getOrderReturnReson:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@orderReturn/v1/getCause",GRiceAPI];
    [self TouristsRequestWithURLString:url Method:GR_GET Paramers:nil completionHandler:completeHander];
}
+(void)applyOrderReturn:(NSDictionary * )dic CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@orderReturn/v1/applyOrderReturn",GRiceAPI];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:dic completionHandler:completeHander];
}
+(void)getExpressQuery:(NSInteger)orderId CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@order/v1/expressQuery/%ld",GRiceAPI,orderId];
    [self MembershipRequestWithURLString:url Method:GR_GET Paramers:nil completionHandler:completeHander];
}

+(void)orderReturnProgress:(NSString *)type OrderId:(NSInteger)orderId CompleteHander:(RequestBlock)completeHander{
    NSString *url = [NSString stringWithFormat:@"%@orderReturn/v1/orderReturn/%@/%ld",GRiceAPI,type,orderId];
    [self MembershipRequestWithURLString:url Method:GR_GET Paramers:nil completionHandler:completeHander];
}

+(void)cancleReturn:(NSInteger)orderId CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@orderReturn/v1/cancelReturn/%ld",GRiceAPI,orderId];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:nil completionHandler:completeHander];
    
}
+(void)OrderReturnList:(NSDictionary *)dic CompleteHander:(RequestBlock)completeHander
{
    NSString * url = [NSString stringWithFormat:@"%@orderReturn/v1/orderReturnlist",GRiceAPI];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:dic completionHandler:completeHander];
}
+(void)EvaluteOrder:(NSDictionary *)dic CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@v1/evaluate/orderEvaluate",GRiceAPI];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:dic completionHandler:completeHander];
}
+(void)getMyEvaluate:(NSDictionary *)dic CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@v1/evaluate/myEvaluate",GRiceAPI];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:dic completionHandler:completeHander];
    
}
+(void)ReturnMoneyWithOrderId:(NSInteger)orderId ResonType:(NSInteger)resonType CompleteHander:(RequestBlock)completeHander{
    NSString * url = [NSString stringWithFormat:@"%@orderReturn/v1/cancelOrder/%ld/%ld",GRiceAPI,orderId,resonType];
    [self MembershipRequestWithURLString:url Method:GR_POST Paramers:nil completionHandler:completeHander];
}
@end
